#include <sys/time.h>
#include <sys/mman.h>
-typedef struct _GdkWaylandDeviceData GdkWaylandDeviceData;
-
typedef struct _DataOffer DataOffer;
typedef struct _GdkWaylandSelectionOffer GdkWaylandSelectionOffer;
double surface_x, surface_y;
uint32_t time;
uint32_t enter_serial;
+ uint32_t button_press_serial;
GdkWindow *pointer_grab_window;
uint32_t pointer_grab_time;
guint32 repeat_timer;
}
device->time = time;
+ if (state)
+ device->button_press_serial = serial;
event = gdk_event_new (state ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
event->button.window = g_object_ref (device->pointer_focus);
NULL);
}
+uint32_t
+_gdk_wayland_device_get_button_press_serial(GdkWaylandDeviceData *device)
+{
+ return device->button_press_serial;
+}
+
gint
gdk_wayland_device_get_selection_type_atoms (GdkDevice *gdk_device,
GdkAtom **atoms_out)
void _gdk_wayland_device_manager_remove_seat (GdkDeviceManager *device_manager,
guint32 id);
+typedef struct _GdkWaylandDeviceData GdkWaylandDeviceData;
+
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
+uint32_t _gdk_wayland_device_get_button_press_serial(GdkWaylandDeviceData *device);
void _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event);
GSource *_gdk_wayland_display_event_source_new (GdkDisplay *display);
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowImplWayland *parent;
- GdkWaylandDisplay *wayland_display =
- GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindow *transient_for;
if (!impl->mapped && !impl->use_custom_surface)
{
struct wl_seat *grab_input_seat = NULL;
GdkWindowImplWayland *tmp_impl;
+ GdkWaylandDeviceData *device;
parent = GDK_WINDOW_IMPL_WAYLAND (transient_for->impl);
impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_COMBO))
{
-
+ device = wl_seat_get_user_data(grab_input_seat);
wl_shell_surface_set_popup (impl->shell_surface,
grab_input_seat,
- _gdk_wayland_display_get_serial (wayland_display),
+ _gdk_wayland_device_get_button_press_serial(device),
parent->surface,
window->x, window->y, 0);
}